<#import "/freemarker/modeltype.ftl" as mt>
<div class="dataTables_title">
	<div class="dataTables_title_left">按钮注释</div>
	<div class="dataTables_title_right">
		<a class="btn btn-danger" href="#"><i class="icon-lock"></i> 屏蔽</a>
		<a class="btn btn-warning" href="#"><i class="icon-unlock"></i> 解除屏蔽</a>
		<a class="btn btn-success"><i class="icon-pencil"></i> 编辑</a>
	</div>
</div>
<table cellpadding="1" cellspacing="1" class="table table-bordered">
	<thead>
		<tr class="ui-widget-header">
			<th>原因</th>
			<th>审核状态</th>
			<th>开始时间</th>
			<th>结束时间</th>
			<th style="width:25px">操作</th>
		</tr>
	</thead>
	<#list pageBean.resultList as leave>
	<tr class="ui-widget-content">
		<td>${(leave.reason)!''}</td>
		<td><#if (leave.auditStatusList?? && leave.auditStatusList?size gt 0)>
				<#list leave.auditStatusList as list>
				<#if list.au??>
					${(list.auName)!''}
					【<span><#if list.status?? && list.status == 1><font style="color:green;">通过</font><#elseif list.status?? && list.status == 2><font style="color:red;">未通过&nbsp;原因：${(list.remark)!''}</font><#else>未审核</#if></span>】>>>
					<#if leave.auditStatusList?size == (list.pc) && list.status == 1 >
						【<font style="color:orange;">全部通过</font>】
		 			</#if>
				<#else>
					【<font style="color:orange;">未审核</font>】
					<#break/>
					</#if>
				</#list>
			<#else>
				没有设置请假审核流程
			</#if></td>
		<td>${(leave.st?string("yyyy-MM-dd"))!''}</td>
		<td>${(leave.et?string("yyyy-MM-dd"))!''}</td>
		<td>
			<div class="btn-group">
			<#if !leave.deleted>
				<a class="btn btn-xs btn-danger" href="javascript:;" onclick="javascript: shield_leave('${leave.code}');return false;" title="屏蔽"><i class="icon-lock"></i></a>
			<#else>
				<a class="btn btn-xs btn-waring" href="javascript:;" onclick="javascript: unshield_leave('${leave.code}');return false;" title="解除屏蔽"><i class="icon-unlock"></i></a>
			</#if>
				<a class="btn btn-xs btn-success" onclick="javascript:sys_load_handle('leaveApply-edit_${leave.code}');return false;" title="编辑"><i class="icon-pencil"></i></a>
			</div>
		</td>
	</tr>
	</#list>
</table>
<#import "/freemarker/pagination.ftl" as p>
<@p.pagination pageBean 'queryLeaveApply_leave'/>